
Phone = {}

function Phone:Parse(buffer)
	while true do
		local tag = buffer:ReadTag()
		if tag == 0 then
			return

		elseif tag == 1 then
			if self.num == nil then
				self.num = {}
			end
			
			local temp = buffer:ReadString()

			table.insert(self.num, temp)

		end
	end
end

function Phone:Serialize()
	local buf = {}
	SetIndex(buf, WriteBuffer)
	buf:Init()

	
	if self.num ~= nil then
		for k, v in ipairs(self.num) do
			
			buf:WriteString(1, v)

		end
	end

	return buf
end
